package com.tian.controller.management;


import com.tian.common.CommonResult;
import com.tian.dto.ChargingCountRespDto;
import com.tian.dto.ChargingRecordPageReqDto;
import com.tian.dto.ChargingRecordPageRespDto;
import com.tian.service.ChargingRecordManagementService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * {@code @description:} 充电桩管理
 *
 * @author tianwc 公众号：Java后端技术全栈
 * 在线刷题 1200+java面试题和1000+篇技术文章：<a href="https://woaijava.cc/">博客地址</a>
 * {@code @date:} 2024-11-14 22:35
 * {@code @version:} 1.0
 */
@RestController
@RequestMapping("/management/charging/record")
public class ChargingRecordManagementController {

    @Resource
    private ChargingRecordManagementService chargingRecordManagementService;

    @GetMapping("/count")
    public CommonResult<ChargingCountRespDto> count() {
        return chargingRecordManagementService.count();
    }

    @PostMapping("/list")
    public CommonResult<ChargingRecordPageRespDto> list(@RequestBody ChargingRecordPageReqDto chargingRecordPageReqDto) {
        return chargingRecordManagementService.list(chargingRecordPageReqDto);
    }

}
